/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package da523blab3;

/**
 *
 * @author Macfeast
 */
public class DBTest {
    DB testDB = new DB();
    public void testConnect(){
        testDB.connect("Test Address", "Test Username", "Test Password");
        if (testDB.isConnected()){
            System.out.println("Connect - Working");
        } else {
            System.out.println("Connect - Failed");
        }
    }
    
    public void testDisconnect(){
        boolean wereConnected = testDB.isConnected();
        testDB.disconnect();
        if (testDB.isConnected() != wereConnected){
            System.out.println("Disconnect - Working");
        } else {
            System.out.println("Disconnect - Failed");
        }
    }
    
    public void testGetName(){
        if (testDB.getName(3) == "Test 4"){
            System.out.println("Get name - Working");
        } else {
            System.out.println("Get name - Failed");
        }
    }
}